var express = require('express');
var router = express.Router();
var { github } = require('./model');
var { captcha } = require('./captcha');
var { uuid } = require('./uuid');
var { token } = require('./token');
var { localLogin } = require('./auth-local');
var { authenticateQQ, authenticateQQCallback } = require('./auth-qq');
var { authenticateLocal, authenticateLocalCallback } = require('./auth-local');


router.get('/login', authenticateLocal, authenticateLocalCallback);
router.post('/login', authenticateLocal, authenticateLocalCallback);
router.get('/local', authenticateLocal, authenticateLocalCallback);
router.post('/local', authenticateLocal, authenticateLocalCallback);
router.get('/local/callback', github);
router.get('/qq', authenticateQQ, authenticateQQCallback);
router.get('/qq/callback', github);
router.get('/github', github);
router.get('/github/callback', github);
router.get('/twitter', github);
router.get('/twitter/callback', github);
router.get('/captcha', captcha);
router.get('/uuid', uuid);
router.get('/token', token).post('/token', token);
module.exports = router;